package moves;

import jade.core.AID;

import java.io.Serializable;

public class Movement implements Serializable {

	private static final long serialVersionUID = -2002385773495345696L;

	public enum Direction {
		UP, DOWN, LEFT, RIGHT, UPLEFT, UPRIGHT, DOWNLEFT, DOWNRIGHT, NOP, UPFLOOR, OUT, DOWNFLOOR, NEXTFIRE, PUT, CURE;
	}

	public enum Action {
		GO, GOFLOOR, OUT, PUT, CURE;
	}

	private AID agent;
	private Direction direction;
	private Action action;

	// private Type type;

	public void setAgent(AID agent) {
		this.agent = agent;
	}

	public AID getAgent() {
		return agent;
	}

	/**
	 * Empty constructor, remember to initialize agent and order with its
	 * setters
	 */
	public Movement() {
		this.agent = null;
		this.action = null;
		// this.type=null;
		this.direction = null;
	}

	/**
	 * Constructor for a movement order needs an agent and a Action type,
	 * example: Action.GO Also the direction, example: Direction.UP
	 * 
	 * @param agent
	 * @param action
	 * @param direction
	 */
	public Movement(AID agent, Action action, Direction direction) {
		this.agent = agent;
		this.action = action;
		// this.type=null;
		this.direction = direction;
	}

	public void setAction(Action action) {
		this.action = action;
	}

	public Action getAction() {
		return action;
	}

	public void setDirection(Direction direction) {
		this.direction = direction;
	}

	public Direction getDirection() {
		return direction;
	}

}
